package com.hqyj.purchase.controller;

import com.hqyj.purchase.model.PurchaseInfo;
import frame.purchase.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @author qianyexiuci
 * @date 2021/09/06 16:52
 */
@Controller
@RequestMapping("/purchaseController")
public class ListPurchaseController  extends BaseController {
    @RequestMapping("/list.do")
    public String list(HttpServletRequest request, HttpServletResponse response, HttpSession session, Model model){
        List<PurchaseInfo> purchaseInfoList = purchaseService.queryAllPurchaseInfo();
        model.addAttribute("purchaseInfoList",purchaseInfoList);
        return "view/purchase/listPurchase";
    }
}
